Always check to see if the shortcuts exists. We don't want to put invalid
authorJonathan Blandford <jrb@gnome.org>
Wed, 10 Mar 2004 05:19:29 +0000 (05:19 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Wed, 10 Mar 2004 05:19:29 +0000 (05:19 +0000)
Wed Mar 10 00:10:47 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Always
        check to see if the shortcuts exists.  We don't want to put
        invalid dirs in the shortcuts pane.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkfilechooserdefault.c

index 375dd9f81882a0eba99f6663cbef3c8c59dea4fb..a2809e17452ac938662fe93750ee556237abb36f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Mar 10 00:10:47 2004  Jonathan Blandford  <jrb@gnome.org>
+
+       * gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Always
+       check to see if the shortcuts exists.  We don't want to put
+       invalid dirs in the shortcuts pane.
+
 Tue Mar  9 16:40:34 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):
index 375dd9f81882a0eba99f6663cbef3c8c59dea4fb..a2809e17452ac938662fe93750ee556237abb36f 100644 (file)
@@ -1,3 +1,9 @@
+Wed Mar 10 00:10:47 2004  Jonathan Blandford  <jrb@gnome.org>
+
+       * gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Always
+       check to see if the shortcuts exists.  We don't want to put
+       invalid dirs in the shortcuts pane.
+
 Tue Mar  9 16:40:34 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):
index 375dd9f81882a0eba99f6663cbef3c8c59dea4fb..a2809e17452ac938662fe93750ee556237abb36f 100644 (file)
@@ -1,3 +1,9 @@
+Wed Mar 10 00:10:47 2004  Jonathan Blandford  <jrb@gnome.org>
+
+       * gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Always
+       check to see if the shortcuts exists.  We don't want to put
+       invalid dirs in the shortcuts pane.
+
 Tue Mar  9 16:40:34 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):
index 375dd9f81882a0eba99f6663cbef3c8c59dea4fb..a2809e17452ac938662fe93750ee556237abb36f 100644 (file)
@@ -1,3 +1,9 @@
+Wed Mar 10 00:10:47 2004  Jonathan Blandford  <jrb@gnome.org>
+
+       * gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Always
+       check to see if the shortcuts exists.  We don't want to put
+       invalid dirs in the shortcuts pane.
+
 Tue Mar  9 16:40:34 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):
index 375dd9f81882a0eba99f6663cbef3c8c59dea4fb..a2809e17452ac938662fe93750ee556237abb36f 100644 (file)
@@ -1,3 +1,9 @@
+Wed Mar 10 00:10:47 2004  Jonathan Blandford  <jrb@gnome.org>
+
+       * gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Always
+       check to see if the shortcuts exists.  We don't want to put
+       invalid dirs in the shortcuts pane.
+
 Tue Mar  9 16:40:34 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):
index cde440d3da44fe13726b65139ab80d608315915d..16b7fe61ec5b62aa5ff457776ff059d0432e1f84 100644 (file)
@@ -869,16 +869,17 @@ shortcuts_insert_path (GtkFileChooserDefault *impl,
     }
   else
     {
+      /* Always check to make sure that the directory exists. */
+      GtkFileInfo *info = get_file_info (impl->file_system, path, FALSE, error);
+      if (info == NULL)
+       return FALSE;
+
       if (label)
        label_copy = g_strdup (label);
       else
-       {
-         GtkFileInfo *info = get_file_info (impl->file_system, path, TRUE, error);
-         if (!info)
-           return FALSE;
-         label_copy = g_strdup (gtk_file_info_get_display_name (info));
-         gtk_file_info_free (info);
-       }
+       label_copy = g_strdup (gtk_file_info_get_display_name (info));
+
+      gtk_file_info_free (info);
 
       data = gtk_file_path_copy (path);
       pixbuf = gtk_file_system_render_icon (impl->file_system, path, GTK_WIDGET (impl),